FolderDialog
FolderName$ = FolderDialog(Title$, [Folder])
 
Parameters:

    Title$=the title of the dialog
    [Folder]=the initially selected folder
Returns:

    FolderName$= The fullpath of the selected folder. If no folder was selected, it will return a NULL string
 

     FolderDialog displays a folder dialog so the user can choose a folder rather than a file.

Returns the folder the user selected or a NULL string if the dialog was cancelled.
* Title$ = the text in the title bar of the dialog
* Folder$ = the initial folder that is opened in the dialog. This parameter is optional


FACTS:


      * The FolderDialog function returns a NULL string if no folder was selected or the user selects cancel.
      * FolderDialog is not asynchronous, so the PlayBasic application will halt while the dialog is open.



  
; Include the Dialogs library in this program
  #Include "PBDialogs2"
  
; Title Of the Folder Dialog
  Title$="Select A Folder On Your Computer"
  
; Call the Folder Dialog, and set it's starting
; location to the current location
  FOlder$=FolderDialog(Title$,CurrentDir$())
  
; Display the Info about this file$
  If Folder$=""
     Print "You Selected To: Cancel"
  Else
     
     Print "Folder="+Folder$
     
     If FolderExist(Folder$)
        Print "This Folder Exists"
     Else
        Print "This Folder Doesn't Exist"
     EndIf
     
  EndIf
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKey
  
  




This example would output.

  
  
  

 
Related Info: OpenFileDialog | SaveFileDialog :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com